<template>
  <div class="messageBox">
    <MessgageType
      @typeValue="typeValue"
      @bReaded="bReaded"
    />
    <MessageList
      ref="msgList"
      :read="read"
      :types="type"
    />
    <PageNation />
  </div> 
</template>
<script>
// @ is an alias to /src
import MessgageType from '../../components/message/message_type.vue';
import MessageList from '../../components/message/message_list.vue';
import PageNation from '../../components/common/page_nation.vue'
export default {

	components: {
		MessgageType,
		MessageList,
		PageNation
	},
	data(){
		return{
			type:"all",
			read:false
		}
	},
	methods:{
		//消息类型
		typeValue(e){
			console.log(e)
			this.type = e;
			this.$refs.msgList.getMsgList(e,this.read);
		},
		//消息状态
		bReaded(e){
			this.read = e;
			this.$refs.msgList.getMsgList(this.type,e);
		}
	}
	
};
</script>

<style scoped lang="scss">

</style>
